package com.k.ums.handler;

import com.k.ums.exception.UserPasswordNotMatchException;
import com.k.ums.model.ResponseResult;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * @Description:
 * @Author: kt
 * @CreateTime: 2022/2/7
 */
@RestControllerAdvice
public class GlobalExceptionHandler {

    @ExceptionHandler(UserPasswordNotMatchException.class)
    public ResponseResult loginException(UserPasswordNotMatchException e) {
        return ResponseResult.error(e.getMessage());
    }
}
